
const TokenKey = 'Authorization'

const nickNameKey = 'nickName'

const uidKey = 'uid'

const backendUidKey = "backendUid"

const backendTypeKey = "backendType"

const backendNameKey = "backendName"

const backendTokenKey = 'Authorization'

/**
 * 前台系统
 */
export const getToken = () => {
    return localStorage.getItem(TokenKey);
}

export const setToken = (token) => {
  return localStorage.setItem(TokenKey, token)
}

export const removeToken = () =>  {
  return localStorage.removeItem(TokenKey)
}

export const removeNickName = () =>  {
  return localStorage.removeItem(nickNameKey)
}

export const setNickName = (nickName) => {
  return localStorage.setItem(nickNameKey, nickName)
}

export const getNickName = () => {
  return localStorage.getItem(nickNameKey);
}

export const setUid = (uid) => {
  return localStorage.setItem(uidKey, uid)
}

export const getUid = () => {
  return localStorage.getItem(uidKey);
}

export const removeUid = () =>  {
  return localStorage.removeItem(uidKey)
}


/**
 * 后台系统
 */
export const setBackendUid = (backendUid) => {
  return localStorage.setItem(backendUidKey, backendUid);
}

export const getBackendUid = () => {
  return localStorage.getItem(backendUidKey);
}

export const setBackendType = (backendType) => {
  return localStorage.setItem(backendTypeKey, backendType);
}

export const getBackendType = () => {
  return localStorage.getItem(backendTypeKey);
}

export const setBackendName = (backendName) => {
  return localStorage.setItem(backendNameKey, backendName);
}

export const getBackendName = () => {
  return localStorage.getItem(backendNameKey);
}

export const getBackendToken = () => {
  return localStorage.getItem(backendTokenKey);
}

export const setBackendToken = (backendToken) => {
  return localStorage.setItem(backendTokenKey, backendToken);
}

export const removeBackendUid = () => {
  return localStorage.removeItem(backendUidKey);
}

export const removeBackendToken = () => {
  return localStorage.removeItem(backendTokenKey);
}

export const removeBackendName = () => {
  return localStorage.removeItem(backendNameKey);
}

export const removeBackendType = () => {
  return localStorage.removeItem(backendTypeKey);
}